package com.abhimanyu.bootstrap.listeners;

import org.apache.log4j.Logger;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionListener;
import org.springframework.stereotype.Component;

@Component
public class JobListener implements JobExecutionListener {

	public void beforeJob() throws Exception {
	}

	public void afterJob() throws Exception {
	}

	public void beforeJob(JobExecution arg0) {
		Logger.getLogger(JobListener.class).debug("STARTING JOB");
		//throw new RuntimeException("TESTING");

	}

	public void afterJob(JobExecution arg0) {
		Logger.getLogger(JobListener.class).debug("ENDING JOB");

	}

}
